package com.juyu.miliao.api.controller;

import java.util.List;

import javax.annotation.Resource;

import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import com.juyu.miliao.api.domain.Grade;
import com.juyu.miliao.api.service.GradeService;
/**
 * 壕等级要求/壕等级要求
 * @author wbf
 * 2018年6月25日
 */
@RestController
@RequestMapping("/grade")
public class GradeController {
	@Resource
	GradeService gradeService;

	/**
	 * 壕等级要求/壕等级要求
	 */
	@GetMapping("/{type:^[1-9][0-9]*$}")
	public List<Grade> getGradeListByType(@PathVariable("type") Integer type) {
		return gradeService.getGradeListByType(type);
	}
}
